package cn.ycc1.boot3config.controller;

import cn.ycc1.boot3config.properties.PersonConfigurationProperties;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ycc
 * @date 2024/9/10
 */
@RestController
@RequiredArgsConstructor
public class TestController {
    private final PersonConfigurationProperties personConfigurationProperties;
    private static String name;

    @GetMapping("/test")
    public String test() {
//        name = personConfigurationProperties.getName();
        System.out.println(name);
        test2();
        return "test";
    }

    public static void test2() {
        test3();
//        String name = personConfigurationProperties.getName();
//        System.out.println(name);
    }
    public static void test3() {
        System.out.println("test3");
    }
}
